#pragma once

#define MAX_STREAM_RESOLUTION		3
#define MAX_SUBSTREM_MODE			3

#include "../_inc_set/def_setting.h"

typedef struct _TAG_RESOLUTION_PROPERTY
{
	BOOL bResolEnable;
	int nMainWidth;
	int nMainHeight;
	int nMainFps;
	int nMotionFps;

	BOOL bSubstreamSupport;
	int nSubWidth;
	int nSubHeight;
	int nSubFps;
	int nMainFps_Sub;

	BOOL bPbSupport;
	int nPbWidth;
	int nPbHeight;
	int nPbFps;
	int nMainFps_Pb;

}ST_RESOL_PROP, *LPST_RESOL_PROP;

typedef struct _TAG_CAMERA_PROPERTY
{
	BOOL bCameraEnable;
	CString strPosition;		//FRONT, REAR, LEFT, RIGHT, ETC
	CString strISP;
	int nSensor_NVP2400;
	ST_RESOL_PROP stResolProp[MAX_STREAM_RESOLUTION];
	ST_RESOL_PROP stResolPropOpt[MAX_STREAM_RESOLUTION];
	BOOL bControlFps;
	BOOL bMotionFps;
} ST_CAMERA_PROP, *LPST_CAMERA_PROP;

class CDeviceInfo : public CObject
{
public:
	enum _TAG_SUBSTREM_MODE
	{
		modeNormal = 0,
		modeSubstream,
		modePlayback,
	};
	
	enum _TAG_ISP
	{
		isp_other = 0,
		isp_NVP2400,
	};

public:
	CDeviceInfo(void);
	virtual ~CDeviceInfo(void);

//private:
	BOOL m_bLoad;
	int m_nVersion;
	CString m_strModelName;
	CString m_strChipset;
	int m_nMaxChannel;
	BOOL m_bAutoChannelDetect;
	DWORD m_dwModeDiff;
	CString m_strInternalName;

	ST_CAMERA_PROP m_stStreamProp[MAX_CHANNEL];

	BOOL m_bAudioInputGain;
	BOOL m_bAudioOutputGain;


//public:
	void LoadCfgFile(CString strFileName);
	void LoadCfgFileUnknown();

	BOOL GetDefault(KConfig *pKConfig);

private:
	void GetDefault_Common(KConfig *pKConfig);
	//NVS3660
	void GetDefault_NVS3660_FH1(KConfig *pKConfig);
	void GetDefault_NVS3660_HD2D1(KConfig *pKConfig);
	void GetDefault_NVS3660_HD2HD2(KConfig *pKConfig);

	//NVS3600
	void GetDefault_NVS3600_HD(KConfig *pKConfig);

	//NVS2310
	void GetDefault_NVS2310_FHD1(KConfig *pKConfig);

	//NVS3310
	void GetDefault_NVS3310_FH1HD1(KConfig *pKConfig);
	void GetDefault_NVS3310_FH2HD2(KConfig *pKConfig);
	void GetDefault_NVS3310_HD1HD1(KConfig *pKConfig);
	void GetDefault_NVS3310_FH1_HD1HD1(KConfig *pKConfig);
};
